<?php
class IndexAction extends BaseAction {
    public function index(){
        $this->get_index_image();
        $this->get_deal_cate_list();
        $status = is_null($this->_get('status')) ? 'all' : $this->_get('status');
        $type = is_null($this->_get('type')) ? 'new' : $this->_get('type');
        $recommend = 0;
        if($type == "new"){
            $recommend = 1;
        }
        $this->get_deal_list(false,$recommend,false,$type,false,false,false,null,$status,'sort','desc',10,true);
        $this->assign('type',$type);
        $this->assign('status',$status);
        $this->display();
    }

    public function news(){
        $id = intval($_REQUEST['id']);
        $this->get_help_view($id);
        $this->display();
    }
}